package dbPhase.hypeerweb;
/**
 * Connection is a class that packages up a nodes connections to be able to
 * pass them to another node.
 *
 *@pre Domain:
 * 	delegate - Node
 *
 *
 * @author scott44
 *
 */
public class Connection {
	protected Node delegate;
	protected Node sourceParent;
	/**
	 * Connection - Constructor to set the delegate to be the node to contain its connections.
	 *
	 * @pre Node n != null
	 * @param n - is a Node with it's neighbors, fold, and pointers if such
	 *
	 */
	public Connection(Node n, Node b) {
		delegate = n;
		sourceParent = b;
	}

	/**
	 * addConnection - Takes in a node to add to delegate as a neighbor, fold, pointer depending
	 * on the role the given node.
	 *
	 * @pre add!=null
	 *
	 * @param add - Node to add as a connection to the delegate node. To be overridden depending
	 * on the role the connection is to the node that it is being added to.
	 */
	public void addConnection(Node add) {

	}

	/**
	 * removeConnection - Takes in a node to remove from delegate as a neighbor, fold, pointer depending
	 * on the role the given node. Should be overridden depending on the role the connection is in
	 * relation to the delegate.
	 *
	 * @pre remove!=null
	 *
	 * @param remove - Node to remove as a connection to the delegate node. To be overridden depending
	 * on the role the connection is to the node that it is being removed from.
	 */
	public void removeConnection(Node remove) {

	}

	/**
	 * replaceConnection - Takes in two nodes, one that is a connection to delegate and the one to replace
	 * it as the new connection. Should be overridden depending on the role the connection is in
	 * relation to the delegate.
	 *
	 * @pre has!=null
	 * 		replace!=null
	 *
	 * @param oldNode - Node to be replaced by the other given node as a connection to the delegate node.
	 * @param newNode - Node to replace the connection for the delegate node
	 */
	public void replaceConnection(Node oldNode, Node newNode) {

	}


}
